home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / for.n < prev    next >
Text File  |  1995-07-25  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4.      ffffoooorrrr((((nnnn))))                       TTTTccccllll (((( ))))                       ffffoooorrrr((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           for - ``For'' loop
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ffffoooorrrr _s_t_a_r_t _t_e_s_t _n_e_x_t _b_o_d_y
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           FFFFoooorrrr is a looping command, similar in structure to the C  ffffoooorrrr
  20.           statement.   The _s_t_a_r_t, _n_e_x_t, and _b_o_d_y arguments must be Tcl
  21.           command strings, and _t_e_s_t is an expression string.  The  ffffoooorrrr
  22.           command  first invokes the Tcl interpreter to execute _s_t_a_r_t.
  23.           Then it repeatedly evaluates _t_e_s_t as an expression;  if  the
  24.           result  is  non-zero it invokes the Tcl interpreter on _b_o_d_y,
  25.           then invokes the Tcl interpreter on _n_e_x_t, then  repeats  the
  26.           loop.   The command terminates when _t_e_s_t evaluates to 0.  If
  27.           a ccccoooonnnnttttiiiinnnnuuuueeee command is invoked within _b_o_d_y then any remaining
  28.           commands  in  the  current  execution  of  _b_o_d_y are skipped;
  29.           processing continues by  invoking  the  Tcl  interpreter  on
  30.           _n_e_x_t,  then  evaluating _t_e_s_t, and so on.  If a bbbbrrrreeeeaaaakkkk command
  31.           is invoked within _b_o_d_y or _n_e_x_t, then the  ffffoooorrrr  command  will
  32.           return immediately.  The operation of bbbbrrrreeeeaaaakkkk and ccccoooonnnnttttiiiinnnnuuuueeee are
  33.           similar to the corresponding statements in C.   FFFFoooorrrr  returns
  34.           an empty string.
  35.  
  36.  
  37.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  38.           for, iteration, looping
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/17/95)
  64.  
  65.  
  66.  
  67.